package se.hiq.wineo.client.events;

import se.hiq.wineo.shared.data.WineDetails;

import com.google.gwt.event.shared.GwtEvent;

public class WineUpdatedEvent extends GwtEvent<WineUpdatedEventHandler> {
	public static Type<WineUpdatedEventHandler> TYPE = new Type<WineUpdatedEventHandler>();
	
	private final WineDetails wine;
	
	public WineUpdatedEvent(WineDetails wine) {
		this.wine = wine;
	}
	
	@Override
	protected void dispatch(WineUpdatedEventHandler handler) {
		handler.onWineUpdatedEvent(wine);
	}

	@Override
	public Type<WineUpdatedEventHandler> getAssociatedType() {
		return TYPE;
	}

}
